{{extend "base.html"}}

{{block content}}
<div style="padding: 5px;">
		<table class="tableForm" id="tb">
        	<tbody>
			<tr>
                  <th style="width:80px;">机房</th>
                  <td>{{=cr_name}}
                  </td>
			</tr>
            <tr>
				<th style="width: 80px;">设备型号</th>
				<td>{{=hardware_manufacturer}}&nbsp&nbsp{{=hardware_name}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">序列号</th>
				<td>{{=switch_sn}}
				</td>
			</tr>
            <tr>
				<th style="width: 80px;">资产编号</th>
				<td>{{=switch_asset_tag}}
				</td>
			</tr>
           <tr>
				<th style="width: 80px;">IP信息</th>
                <td>
                	<table>
                	  <thead>
                      	<tr>
                        	<td>vlan编号</td>
                            <td>IP地址</td>
                        </tr>
                       </thead>
                       {{for i in sw_ip:}}
                        <tr>
                            <td>{{=i.switch_ip_vlan}}</td>
                            <td>{{=i.switch_ip_addr}}</td>
                        </tr>
                        {{pass}}
                     </table>
                  </td>
			</tr>
            
            <tr>
				<th style="width: 80px;">备注</th>
				<td>{{=comment}}</td>
			</tr>      
            </tbody>    
		</table>
      <table class="tableForm" id="tb2">
          <thead><tr><td>端口号</td><td>服务器设备</td><td>使用状态</td></tr></thead>
          {{for i in s_port:}}
          <tr>
              <td>{{=i.switch_port_num}}</td>
              <td>{{if i.server_id != None:}}{{=i.server_id.system_hostname}}{{pass}}</td>
              <td>{{if i.switch_port_status == 1:}}使用{{pass}}</td>
           </tr>
           {{pass}}
       </table>
</div>
{{end}}